<style scoped>
</style>
<template>
  <div>
  <ul>
    <li>
      <label for="">邮政编码</label>
      <input type="text" v-model="param.code">
    </li>
    <li>
      <label for="">联系方式</label>
      <input type="text" v-model="param.telephone">
    </li>
    <li>
      <label for="">传真</label>
      <input type="text" v-model="param.fax">
    </li>
    <li>
      <label for="">Email</label>
      <input type="text" v-model="param.email">
    </li>
    <li>
      <label for="">备案号</label>
      <input type="text" v-model="param.num">
    </li>
    <li>
      <label for="">copyright</label>
      <input type="text" v-model="param.copyright">
    </li>
    <li>
      <upload></upload>
    </li>
    <li>
      <label for="">内容</label>
      <editor ref="editor" :htmls.sync="param.html">
      </editor>
    </li>
  </ul>
  <p class="text-center editor-foot">
    <button class="btn" @click="save">保存</button>
    <button class="btn" @click="close">取消</button>
  </p>
  </div>
</template>

<script>

import mixin from './mixin'
export default {
  mixins:[mixin],
  data() {
    return {
      param:{
        email: this.data.email,
        telephone: this.data.telephone,
        code: this.data.code,
        fax: this.data.fax,
        ewx: this.data.ewx,
        copyright: this.data.copyright,
        num: this.data.num,
        html: this.data.html
      },
    };
  },
  mounted () {
  },
  methods: {
    save () {
      let vm = this
      if(this.$refs.editor){
        this.param.html = this.$refs.editor.getAllHtml()
      }
      this.$emit('save',vm.param)
    },
  }
}
</script>
